package com.sgcc.csc.service.impl;

import com.sgcc.csc.bean.User;
import com.sgcc.csc.dao.ShiroDao;
import com.sgcc.csc.dto.DataVUserDto;
import com.sgcc.csc.dto.GwyzDto;
import com.sgcc.csc.framework.jdbc.page.PageQuery;
import com.sgcc.csc.framework.jdbc.page.PageResult;
import com.sgcc.csc.service.IShiroService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author cuiyang
 * @title: SynMessageFromTenceImpl
 * @projectName wxws
 * @description: 腾讯接口的数据入库
 * @date 2021/2/120:10
 */
@Service
public class ShiroImpl implements IShiroService {

    @Resource
    private ShiroDao shiroDao;

    @Override
    public List<DataVUserDto> getPassword(String username) {
        return shiroDao.getPassword(username);
    }

    @Override
    public List<DataVUserDto> getRole(String username) {
        return shiroDao.getRole(username);
    }

    @Override
    public void updatePassword(String username, String newPassword) {
        shiroDao.updatePassword(username,newPassword);
    }

    @Override
    public List<DataVUserDto> getUser() {
        return shiroDao.getUser();
    }

    @Override
    public void banUser(String username) {
        shiroDao.banUser(username);
    }

    @Override
    public List<DataVUserDto> checkUserBanStatus(String username) {
        return shiroDao.checkUserBanStatus(username);
    }

    @Override
    public List<DataVUserDto> getRolePermission(String username) {
        return shiroDao.getRolePermission(username);
    }

    @Override
    public List<DataVUserDto> getPermission(String username) {
        return shiroDao.getPermission(username);
    }

    @Override
    public User getUserId(String userId) {
        Map<String,Object> map =new HashMap<>();
        map.put("userId",userId);
//        shiroDao.getUserId(userId);
        return null;
    }

    @Override
    public List<String> getTableName() {
        return shiroDao.getTaleName();
    }
}
